<!DOCTYPE html>
<html lang="en-us">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

  	<meta property="og:title" content=" Charles功能 &middot;  我的博客" />
  	<meta property="og:site_name" content="我的博客" />
  	<meta property="og:url" content="/my_technology/09/" />
    
    
  	<meta property="og:type" content="article" />

    <meta property="og:article:published_time" content="2020-06-08T20:26:45&#43;08:00" />

    
    

  <title>
     Charles功能 &middot;  我的博客
  </title>

    <meta name="description" content="这里是付佳康的个人博客" />

    <meta name="HandheldFriendly" content="True" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <link rel="shortcut icon" href="/my_technology/images/favicon.ico">
	  <link rel="apple-touch-icon" href="/my_technology/images/apple-touch-icon.png" />
    
    <link rel="stylesheet" type="text/css" href="/my_technology/css/screen.css" />
    <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400|Inconsolata" />


    
      
          <link href="/my_technology/index.xml" rel="alternate" type="application/rss+xml" title="我的博客" />
      
      
    
    <meta name="generator" content="Hugo 0.68.3" />

    <link rel="canonical" href="/my_technology/09/" />

     
</head>
<body class="nav-closed">
<div id="particles-js"></div>
  


 <div class="site-wrapper">



<header class="main-header " style="background-image: url(/my_technology/images/user.jpg)">

    <nav class="main-nav overlay clearfix">
        
            <a class="blog-logo" href="/my_technology/"><img src="/my_technology/images/user.png" alt="Blog Logo" /></a>
        
        
    </nav>
<div class="vertical">
        <div class="main-header-content inner">
            <h1 class="page-title">
              <a class="btn-bootstrap-2" href="#content">我的博客</a>
          </h1>
          <h2 class="page-description">这里是付佳康的个人博客</h2>
        </div>
</div>
    <a class="scroll-down icon-arrow-left" href="#content"><span class="hidden">Scroll Down</span></a>
</header>

  <main id="content" class="content" role="main">


  <article class="post ">

    <header class="post-header">
        <h1 class="post-title">Charles功能</h1>
        <section class="post-meta">
        
         
        </section>
    </header>

    <section class="post-content">
      <pre><code>1.抓取http和https网络封包（抓包）
</code></pre><pre><code>2.Charles断点请求
    设置断点流程：
        1.右键点击要进行断点操作的地址，点击Breakpoints
        2.在Proxy（代理）中点击Breakpoints Settings可进行设置
</code></pre><p><img src="../%E6%96%AD%E7%82%B9.png" alt="断点"></p>
<pre><code>3.支持和重发网络请求：
    重复网络请求的目的：
        后台调试过程中，一直在客户端实现点点点过于麻烦
        直接使用charles的重发网络的方式可以直接多次调用接口发送请求，方便查询结果
        重发网络的方式：
            1.右键点击连接，点击repeat 的方式进行单次的网络请求
            1.右键点击连接，点击Repeat Advanced 或 在Tools下点击Advanced Repeat进入下图定义，进行多次网络请求
</code></pre><p><img src="../%E5%8F%91%E9%80%81%E8%AF%B7%E6%B1%82.png" alt="请求次数"></p>
<pre><code>4.支持修改网络参数
    1.先进行断点操作
    2.如下图
</code></pre><p><img src="../%E4%BF%AE%E6%94%B9%E8%AF%B7%E6%B1%82%E7%BD%91%E7%BB%9C%E5%8F%82%E6%95%B0.png" alt="修改请求网络参数"></p>
<pre><code>5.支持网络请求并修改参数值
    1.先进行断点操作
    2.刷新进入
    2.如下图
</code></pre><p><img src="../%E4%BF%AE%E6%94%B9%E8%AF%B7%E6%B1%82.png" alt="修改网络请求">
<img src="../%E4%BF%AE%E6%94%B9%E5%8F%82%E6%95%B0%E5%80%BC.png" alt="修改参数值"></p>
<pre><code>6.支持弱网测试：
    网络： 5G、 4G、 3G、 公共网络
    网络延迟情况，对web/app操作有一定的影响
    数据包从用户的客户端发送到服务器等后，在服务器反馈到客户端的时间就是网络延迟
    用来测试网络管理的工具  PING
    
    在代理（proxy）里找 Throttle Settings设置如下图：
</code></pre><p><img src="../%E5%BC%B1%E7%BD%91%E6%B5%8B%E8%AF%95.png" alt="弱网测试">
<img src="../%E5%BC%B1%E7%BD%91%E6%B5%8B%E8%AF%952.png" alt="弱网测试"></p>

    </section>


  <footer class="post-footer">


    
    <figure class="author-image">

        <a class="img" href="/my_technology/" style="background-image: url(/my_technology/images/user.png)"><span class="hidden">付佳康</span></a>
    </figure>
    

    <section class="author">

  <p>付佳康</p>
  

</section>


    
    <section class="share">
      <h4>Share this page</h4>
      <a class="icon-twitter" style="font-size: 1.4em" href="https://twitter.com/share?text=Charles%e5%8a%9f%e8%83%bd&amp;url=%2fmy_technology%2f09%2f"
          onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
          <span class="hidden">Twitter</span>
      </a>
      <a class="icon-facebook" style="font-size: 1.4em" href="https://www.facebook.com/sharer/sharer.php?u=%2fmy_technology%2f09%2f"
          onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
          <span class="hidden">Facebook</span>
      </a>
      <a class="icon-google-plus" style="font-size: 1.4em" href="https://plus.google.com/share?url=%2fmy_technology%2f09%2f"
         onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
          <span class="hidden">Google+</span>
      </a>
    </section>
    

    
    
    

  </footer>
</article>

</main>
    <footer class="site-footer clearfix">
        <section class="copyright"><a href="">我的博客</a> </section>
        
        <section class="poweredby">Proudly generated by <a class="icon-hugo" href="https://gohugo.io">HUGO</a>, with <a class="icon-theme" href="https://github.com/syui/hugo-theme-air">hugo-theme-air</a> theme</section>
        
    </footer>
    </div>
    <script type="text/javascript" src="/my_technology/js/jquery.js"></script>
    <script type="text/javascript" src="/my_technology/js/jquery.fitvids.js"></script>
    <script type="text/javascript" src="/my_technology/js/index.js"></script>
    <script src="/my_technology/js/particles.min.js"></script>
    <script src="/my_technology/js/particles.js"></script>  

</body>
</html>

